home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------------------
- //
- // File: BitBlitz.h
- //
- // Contents: Type definitions, global constants and variables, and routine declarations
- // used externally to the BitBlitz.c segment.
- //
- //
- // By Georgiann ("George") Delaney
- // © 1989 - 1990, Apple Computer, Inc.
- //
- //--------------------------------------------------------------------------------------*/
-
-
-
- /*--------------------------------------------------------------------------------------*/
- /* Constants */
-
-
- #define kClpRgn 0 /* Region ID constants */
- #define kVisRgn 1
- #define kMskRgn 2
-
- #define kSrcWindow 0 /* Window ID constants */
- #define kMskWindow 1
- #define kDstWindow 2
- #define kBitWindow 3
-
- #define kCopyMask 0 /* Trap selection constants */
- #define kCopyDeepMask 1
- #define kCopyBits 2
-
-
- /*--------------------------------------------------------------------------------------*/
- /* Type definitions */
-
-
- typedef struct { /* Struct which holds color information for */
- short menuIndex; /* setting the FG, BK, OP, and Hilite colors. */
- RGBColor rgb;
- } ColorAttributes;
-
-
- typedef struct {
- short type;
- RgnHandle rgn;
- } RgnAttributes;
-
-
- typedef struct { /* Definition of the window attributes record */
- WindowPtr window; /* describing the contents/status of each of */
- short bufferType; /* the 4 CopyMask windows */
- short bufferDepth;
- union {
- GWorldPtr gworld;
- CGrafPtr pixmap;
- GrafPtr bitmap;
- } buffer;
- short contentType;
- union {
- short saturation;
- RGBColor RGB;
- PicHandle pictInfo;
- } content;
- } WindowAttributes;
-
-
-
-
- /*--------------------------------------------------------------------------------------*/
- /* Global Variables */
-
- RgnAttributes gRList[3];
-
- WindowAttributes gWList[4]; /* Window list containing the 4 CopyMask Windows
- attribute records. */
-
- short gCopyMode = srcCopy; /* The current copy mode that will be applied
- in the CopyMask() call. */
-
- short gTrapSelect = kCopyMask; /* This global designates which of the two traps
- that the user wishes to test */
-
-
- Boolean gColorAvail; /* Global variable designating that color QuickDraw is around */
- Boolean gGWorldsAvail; /* Global variable designating that GWorlds are implemented/ */
-
- Boolean gUseScreenBits = false;
- Boolean gDither = false;
-
- ColorAttributes gFGColor,
- gBKColor,
- gOPColor,
- gHiliteColor;
-
- RgnHandle gHoldVisRgn = nil;
- RgnHandle gHoldClpRgn = nil;
-
-
-
- /*--------------------------------------------------------------------------------------*/
- /* Externally visible routines */
-
- Boolean myTrapAvailable (theNumber,theType);
-
- void InitTestGlobals (void);
- void InitColorSettings (void);
-
- void InitRgnSettings (void);
- void UpdateRgnSettings (void);
- void DisposeRgnSettings (void);
-
- void InitTestWindowAttributes(void);
- Boolean CreateTestWindows (void);
- void DisposeTestWindows (void);
-
- Boolean ResizeTestWindow (Point *newDimen, short windowCode);
- Boolean ChangeWindowAttributes (short windowCode);
-
- void SelectFGColor (short theItem);
- void SelectBKColor (short theItem);
- void SelectOPColor (short theItem);
- void SelectHiliteColor (short theItem);
-
- void SelectRgn (short rgnCode, short rgnType);
- Boolean SelectTrap (void);
-
- void DrawBuffer (short windowCode);
- void DrawWindow (short windowCode);
-
- short CopyMode2ModeMenuItem (short theMode);
- short ModeMenuItem2CopyMode (short theItem);
-
- void NeedSystem7Dlog (void);
- void AboutBitBlitz (void);
-